W0B: gate RSS publication on canonical feed status#49
Conversation
Co-Authored-By: Codex <noreply@openai.com>
🤖 Codex PR Review🚫 Merge blocked: 1 serious issue(s) found in high-risk files 🚫 Blocking IssuesThese issues must be fixed before this PR can be merged: 1. 🟠 [HIGH] Logic in
|
Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a5199f82d9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| env: | ||
| FEEDS_PATH: ${{ github.event.inputs.feeds_path || 'config/free_rss_feeds.csv' }} | ||
| ALIASES_PATH: ${{ github.event.inputs.aliases_path || 'config/core_us_equity_aliases.csv' }} | ||
| WATCHLIST_PATH: ${{ github.event.inputs.watchlist_path || 'data/live/political_watchlist.csv' }} |
There was a problem hiding this comment.
Validate max_items_per_feed before publishing
This boundary check pins the path inputs, but the fetch step still uses github.event.inputs.max_items_per_feed. In a manual main run with commit_outputs=true, setting that input to 1 (or another smaller/negative value) can still produce a canonical all-accepted status and then publish truncated live CSVs, so this publication-affecting input should also be pinned or live commits should ignore it.
Useful? React with 👍 / 👎.
| decision_kind = None | ||
| if status_output: | ||
| write_fetch_status(status_output, statuses, item_count=len(rows)) | ||
| decision_kind = write_fetch_status(status_output, statuses) | ||
| if decision_kind is DecisionKind.HARD_FAIL: |
There was a problem hiding this comment.
Preserve all-failed errors without status output
When callers use --continue-on-feed-error without --status-output, decision_kind stays None, so an all-feeds-failed run now writes an empty CSV and exits successfully. The previous behavior raised on all configured feeds failing regardless of status output; keep that failure detection independent of the optional status file so downstream jobs don't treat an empty scrape as a successful fetch.
Useful? React with 👍 / 👎.
| - name: Validate canonical feed status readback | ||
| run: python scripts/validate_fetch_status.py --status data/output/rss_source_pipeline/source_fetch_status.json --fetch-exit data/output/rss_source_pipeline/fetch_exit.txt |
There was a problem hiding this comment.
Verify published rows against status digests
This readback gate only receives source_fetch_status.json and fetch_exit.txt, so it cannot catch a mismatch between the canonical status and the source_items.csv that is copied in the publish step. If source_items.csv is truncated or altered after write_fetch_status but before publish, an otherwise eligible status still passes here; pass the CSV into validation and recompute the accepted row count and aggregate digest before allowing the live copy.
Useful? React with 👍 / 👎.
Scope
Fresh W0B from merged main/H2C; no reuse of frozen PRs.
HEAD:refs/heads/mainpush with temporary credential cleanup.Non-scope: weekly artifact, QAR, Pages, publisher, new sources, permissions, and generic contract abstractions.
Validation
uv sync --locked --extra test: passedReview mode: preflight then one concentrated closure; no merge/rerun/poll by worker.